package exprtree;

import visitor.Visitor;

public class PowExpr extends Expr {

	private Expr power;
	private Expr expr;

	/**
	 * PowExpr
	 * @param expression representing the expression
	 * @param power resprenting the power
	 */
	public PowExpr(Expr expression, Expr power){
		this.setExpr(expression);
		this.setPower(power);
	}

	/**
	 * setExpr
	 * @param expr which is an Expr object
	 */
	public void setExpr(Expr expr) {
		this.expr = expr;
	}

	/**
	 * getExpr
	 * @return an Expr
	 */
	public Expr getExpr() {
		return expr;
	}

	/**
	 * setPower
	 * @param power which is an Expr object
	 */
	public void setPower(Expr power) {
		this.power = power;
	}

	/**
	 * getPower
	 * @return an Expr
	 */
	public Expr getPower() {
		return power;
	}

	/**
	 * accept
	 * @param visitor which is an Visitor object
	 * @return an Object
	 */
	public Object accept(Visitor visitor){
		return visitor.visit(this);
	}
}
